package org.weike.mobile.api.configure;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.weike.mobile.api.interceptor.LoginInterceptor;
import org.wk.core.web.configure.LBSWebMvcConfigurerAdapter;


@Configuration
@EnableWebMvc
public class LaBiAdWebAdapter extends LBSWebMvcConfigurerAdapter {
	
    @Bean
    public LoginInterceptor loginInterceptor() {
        return new LoginInterceptor();
    }
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		super.addInterceptors(registry);
		registry.addInterceptor(loginInterceptor()).addPathPatterns("/**");
	}
}
